预约管理API
获取预约列表
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| booking_id | String | Body | 预约ID |
| amenity_id | String | Body | 设施ID |
| amenity_name | String | Body | 设施名称 |
| amenity_picture_url | String | Body | 设施图片地址 |
| amenity_description | String | Body | 设施描述 |
| building_name | String | Body | 楼栋名称 |
| family_name | String | Body | 家庭名称 |
| start_time | String | Body | 开始时间,UTC |
| finish_time | String | Body | 结束时间,UTC |
| state | String | Body | 状态 pending:待审核 rejected:已拒绝 canceled:已取消 success:成功 |
| is_expired | Boolean | Body | 判断预约是否过期 true:已过期 false:未过期 |
| pin_code | String | Body | PIN码 |
| qr_code_url | String | Body | 二维码地址 |
| created_time | String | Body | 创建时间,UTC |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_booking_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"booking_id": "bfa332e258aae1badbb27d31128f442d1",
"amenity_id": "afa332e258aae1badbb27d31128f442dc",
"amenity_name": "Gym",
"amenity_picture_url": "https://test.akubela.com/g",
"amenity_description": "test",
"building_name": "001",
"family_name": "home",
"start_time": "2024-05-02 13:14:15",
"finish_time": "2024-05-02 15:14:15",
"state": "pending",
"is_expired": true,
"pin_code": "123456",
"qr_code_url": "https://test.akubela.com/h.png",
"created_time": "2024-05-01 13:32:45"
}
]
}
失败返回示例
见 接口失败返回
获取预约信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| booking_id | String | Body | 是 | 预约ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| amenity_id | String | Body | 设施ID |
| amenity_name | String | Body | 设施名称 |
| amenity_picture_url | String | Body | 设施图片地址 |
| amenity_description | String | Body | 设施描述 |
| building_name | String | Body | 楼栋名称 |
| family_name | String | Body | 家庭名称 |
| start_time | String | Body | 开始时间,UTC |
| finish_time | String | Body | 结束时间,UTC |
| state | String | Body | 状态 pending:待审核 rejected:已拒绝 canceled:已取消 success:成功 |
| is_expired | Boolean | Body | 判断预约是否过期 true:已过期 false:未过期 |
| pin_code | String | Body | PIN码 |
| qr_code_url | String | Body | 二维码地址 |
| created_time | String | Body | 创建时间,UTC |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_booking_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"booking_id": "b31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"amenity_id": "afa332e258aae1badbb27d31128f442dc",
"amenity_name": "Gym",
"amenity_picture_url": "https://test.akubela.com/g",
"amenity_description": "test",
"building_name": "001",
"family_name": "home",
"start_time": "2024-05-02 13:14:15",
"finish_time": "2024-05-02 15:14:15",
"state": "pending",
"is_expired": true,
"pin_code": "123456",
"qr_code_url": "https://test.akubela.com/h.png",
"created_time": "2024-05-01 13:32:45"
}
}
失败返回示例
见 接口失败返回
获取可预约设施列表
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| amenity_id | String | Body | 设施ID |
| amenity_name | String | Body | 设施名称 |
| amenity_picture_url | String | Body | 设施图片地址 |
| amenity_description | String | Body | 设施描述 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_booking_amenity_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"amenity_id": "afa332e258aae1badbb27d31128f442dc",
"amenity_name": "Gym",
"amenity_description": "test",
"amenity_picture_url": "https://test.akubela.com/g"
}
]
}
失败返回示例
见 接口失败返回
获取可预约时间列表
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| date | String | Body | 是 | 日期 |
| amenity_id | String | Body | 是 | 设施ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| allowed_booking_time | Object<booking_time> | Body | 允许预约的时间 |
| disallowed_booking_time | []Object<booking_time> | Body | 不允许预约的时间 |
booking_time说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| start_time | String | Body | 开始时间,UTC |
| finish_time | String | Body | 结束时间,UTC |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_booking_time_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"amenity_id": "afa332e258aae1badbb27d31128f442dc",
"date": "2024-01-02"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"allowed_booking_time": {
"start_time": "08:00",
"finish_time": "23:00"
},
"disallowed_booking_time": [
{
"start_time": "08:30",
"finish_time": "11:30"
},
{
"start_time": "21:30",
"finish_time": "23:00"
}
]
}
}
失败返回示例
见 接口失败返回
创建预约信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| amenity_id | String | Body | 是 | 设施ID |
| start_time | String | Body | 是 | 开始时间,UTC |
| duration | Integer | Body | 是 | 预约时长,单位:分钟 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "create_booking_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"amenity_id": "afa332e258aae1badbb27d31128f442dc",
"start_time": "2024-01-02 13:14:15",
"duration": 80
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"booking_id": "b8b5a73f8dd84abaa94dcs248be49b0d1"
}
}
失败返回示例
见 接口失败返回
创建扫码预约信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| booking_code | String | Body | 是 | 预约码 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "create_code_booking_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"booking_code": "bfa332e258aae1badbb27d31128f442dc"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"booking_id": "b8b5a73f8dd84abaa94dcs248be49b0d1"
}
}
失败返回示例
见 接口失败返回
删除预约信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| booking_id | String | Body | 是 | 预约ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "delete_booking_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"booking_id": "b8b5a73f8dd84abaa94dcs248be49b0d1"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
批量删除预约信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| bookings | []Object<booking> | Body | 是 | 预约信息 |
booking说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| booking_id | String | Body | 是 | 预约ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_delete_booking_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"bookings": [
{
"booking_id": "b8b5a73f8dd84abaa94dcs248be49b0d1"
}
]
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回